package com.hk.webapp.error;

/**
 * (C) Copyright 2017-now
 * All rights reserved.
 * <p>
 * 业务错误枚举
 *
 * @author DreamerCK
 * @date 2019-01-08 12:13
 **/
public enum BusinessErrorEnum implements CommonError {

    //1xxxx通用错误类型
    PARAMETER_VALIDATION_ERROR("参数不合法"),

    //2xxxx为用户信息相关错误定义
    USER_NOT_EXISTS("用户不存在"),
    USER_PASSWORD_ERROR("用户名或密码错误"),
    USER_ACCOUNT_LOCKED("用户被锁定"),

    //25xxx为jwt token错误
    JWT_CREATE_ERROR("token创建失败"),
    JWT_TOKEN_INVALID("token无效"),
    JWT_TOKEN_EXPIRES( "token凭证过期"),

    //3xxxx为登录登出相关
    LL_NEED_LOGIN("先登陆吧!"),


    //4xxxx为登录登出相关
    FILE_UPLOADER_NOT_NULL("上传文件不能为空!"),
    ;

    private String errMsg;

    private BusinessErrorEnum(String errMsg) {
        this.errMsg = errMsg;
    }

    @Override
    public String getErrMsg() {
        return this.errMsg;
    }

    @Override
    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}
